/*
 * rom.v
 *
 * Copyright 2024 dh33ex <dh33ex@riseup.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA or visit <http://www.gnu.org/licenses/>.
 *
 *
 */

module rom(
    input       [31:0]   i_addr,
    output      [31:0]   o_instr
);

    reg [31:0]  ROM[0:255];

    /* test programm */
    initial begin
ROM[0] = 32'b01001101000000000000010000000000;
ROM[1] = 32'b01000001000001010000000000001100;
ROM[2] = 32'b01010010000101011111111111111001;
ROM[3] = 32'b00000011000100010000000000000010;
ROM[4] = 32'b11100010000000000000000000010100;
ROM[5] = 32'b10100011110100000000000000000100;
ROM[6] = 32'b10000100110100000000000000000100;
ROM[7] = 32'b01000101010001100000000000001010;
ROM[8] = 32'b10100101110100000000000000001100;
ROM[9] = 32'b10100001110100000000000001110000;
ROM[10] = 32'b11100000111111111111111111111100;
    end

    assign o_instr = ROM[i_addr[31:2]];

endmodule
